package Exercises;

import java.util.Scanner;

public class Task7 {

	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
			System.out.println("Please add M and N numbers: ");
		int m = sc.nextInt();
		int n = sc.nextInt();
			int a = 0;
			long b = 1;
		
		
		for(int i = m; i<=n; i++)
		{
			a +=i;
			
			b *=i;
			
		}

		System.out.println("The sum of the interval numbers: " + a);
		System.out.println("The product of the interval numbers: " + b);





	}

}
